package com.starters.redisson.config;


import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;

import javax.annotation.PostConstruct;

/**
 * @author wuyijie
 * @className: MallRedissonProperties
 * @description: TODO
 * @date 2021/6/12 17:31
 */
@Data
@ConfigurationProperties(prefix = MallRedissonProperties.prefix)
public class MallRedissonProperties {
    private boolean enable = true;
    public static final String prefix = "mall.redisson";

    /**
     * 分布式锁持有锁的超时时间
     */
    private Long timeout = 10000L;

    /**
     * 分布式锁获取锁的超时时间
     */
    private Long tryTimeout = 10000L;


    @PostConstruct
    void initialize() {
        System.out.println("<<<  MallRedissonProperties初始化完成：  >>>" + this.toString());
    }

}
